<!DOCTYPE html>
<html>
	<head>
		<title>event对象的方法</title>
		<meta charset="utf-8" />
	</head>
	<body>
		<a href="http://www.baidu.com" id="click">点击我</a>
	</body>
	<script type="text/javascript">
		document.getElementById("click").onclick = function(e) {
			e.preventDefault();
			alert("超链接不再跳转!");
		}
	</script>
</html>